package com.lyc.mapper;

import com.lyc.beans.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookMapper {
    List<Book> getBooks();

    //判断书籍是否存在
    int checkBook(@Param("book") Book book);


    void addBook(@Param("book") Book book);

    //删除书记
    void deleteBookById(@Param("id") Integer id);

    //获取书籍根据id
    Book getBookById(@Param("id") Integer id);

    //获取书籍根据name
    Book getBookByName(@Param("book") Book book);

    //更新书记
    void updateBook(@Param("book") Book book1);
}
